package main
import "fmt"

func printValue(val interface{}){
	fmt.Printf("val type:%T, val:%v\n",val,val)
}

type Books struct{
	title string
	author string
}

func main(){
	printValue(10)
	printValue("hello")
	printValue(3.14)
	printValue(true)
	printValue([]int{1,2,3,4,5})
	printValue(Books{"goPgram_Pro","LiuJiang"})
}
/* -->
val type:int, val:10
val type:string, val:hello
val type:float64, val:3.14
val type:bool, val:true
val type:[]int, val:[1 2 3 4 5]
val type:main.Books, val:{goPgram_Pro LiuJiang}

*/